package com.scs.application.modules.wm.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.SimpleDataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
/**
 * <p>
 * 库存锁定
 * </p>
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "锁库")
@TableName("wm_stock_lock")
@EntityIndexAnnotation(ix = {"bus_type","bus_key_value","warehouse_id", "uc_type","uc","stock_id","matr_id"},ux = {"stock_id"})
public class StockLock extends SimpleDataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "仓库ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String warehouseId;

    @EntityFieldAnnotation(
            text = "业务类型",
            length = "30",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String busType;

    @EntityFieldAnnotation(
            text = "业务关键字",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String busKeyValue;

    @EntityFieldAnnotation(
            text = "物料ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrId;

    @EntityFieldAnnotation(
            text = "库存ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String stockId;

    @EntityFieldAnnotation(
            text = "唯一码",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String uc;

    @EntityFieldAnnotation(
            text = "唯一码类型",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String ucType;

    @EntityFieldAnnotation(
            text = "数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double qty;

    @EntityFieldAnnotation(
            text = "锁定时间",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Date lockTime;

    @EntityFieldAnnotation(
            text = "锁定说明",
            length = "200",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String lockComment;

    @EntityFieldAnnotation(
            text = "解锁时间",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date unlockTime;

    @EntityFieldAnnotation(
            text = "来源业务单据类型",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String refBusType;
}
